from collections import OrderedDict

from django.shortcuts import render
from django.views import View

from apps.goods.models import GoodsChannel
from utils.categories import get_categories


class IndexView(View):
    """首页广告"""

    def get(self, request):
        """提供首页广告页面"""
        categories = get_categories()
        # 获取商品分类
        context={
            'categories': categories
        }
        return render(request, 'index.html', context=context)
